package com.gw.business.analysis.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.gw.business.analysis.model.UserTrackDataAverage;
import com.gw.business.analysis.service.UserTrackDataAverageService;
import com.gw.platform.service.impl.DefaultService;

@Service
public class UserTrackDataAverageServiceImpl extends DefaultService implements
		UserTrackDataAverageService {

	@Override
	public Boolean insert(UserTrackDataAverage obj) {
		try {
            this.insert("UserTrackDataAverage_inset", obj);
        } catch (Exception e) {
            return false;
        }
        return true;
	}

	@Override
	public Boolean update(UserTrackDataAverage obj) {
		 try {
	            this.update("UserTrackDataAverage_update", obj);
	        } catch (Exception e) {
	            return false;
	        }
	        return true;
	}

	@Override
	public List<UserTrackDataAverage> getSourceByDataTime(String year,String month) {
		Map<String,String> map=new HashMap();
		map.put("year",year);
		map.put("month",month);
		
		return  (List<UserTrackDataAverage>) this.find("UserTrackDataAverage_getSourceByDataTime", map);
	
	}

}
